package avicit.bdp.dgs.metadata.service;

import avicit.bdp.common.base.BaseService;
import avicit.bdp.common.dto.MetadataStateDto;
import avicit.bdp.dgs.metadata.dao.MetadataStateDao;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * @author mayanj
 */
@Service
public class MetadataStateService extends BaseService<MetadataStateDao, MetadataStateDto> {

  public MetadataStateDto getLatestByDatasourceAndTable(String dataSourceId, String tableName) {
    return this.mapper.getLatestByDatasourceAndTable(dataSourceId, tableName);
  }

  public int batchInsert(List<MetadataStateDto> list) {
    return this.mapper.batchInsert(list);
  }
}
